from matplotlib import pyplot as plt
import numpy as np
import math


def sigmoid_function(z):
    fz = []
    for num in z:
        fz.append(1 / (1 + math.exp(-num)))
    return fz


if __name__ == '__main__':
    z = np.arange(-10, 10, 0.01)
    fz = sigmoid_function(z)
    plt.title('Sigmoid Function')
    plt.xlabel('z')
    plt.ylabel('σ(z)')
    plt.plot(z, fz)
    print(1 / (1 + math.exp(-0.3775)))
    plt.show()
